Releasing
=========

:Contact: grubert@users.sourceforge.net, docutils-develop@users.sourceforge.net
:Revision: $Revision: 7396 $
:Date: $Date: 2012-04-29 11:18:23 +0200 (So, 29 Apr 2012) $
:Copyright: This document has been placed in the public domain.

Notes on what happend while releasing.

Release 0.12
============

svn revision: 7749

Tests
-----

Tests are run from svn checkout, only few from install.

Python3 tests are run ::

  rm -rf build test3
  python3 setup.py build
  PYTHONPATH=build/lib python3 test3/alltests.py

* ubuntu 8.04: python 2.4.5, 2.5.2, 2.6.7, 2.7.2 OK

  python 2.6.4rc1 6 failure due to change in error message: no such file ...  

  python 3.2.3 OK

* macosx 10.6.8: python 2.5.4, 2.7.3

  python 2.6.1 6 failure due to change in error message: no such file ...  

  python 3.2, 3.4.1 OK

* ubuntu 14.04: pyton 2.7.6,  python 3.4.0 OK

* windows7: python 2.7.5 

  Error (filed #256): test_writers/test_html4css1_template.py::

      stylesheet = """\
    - <link rel="stylesheet" href="/test.css" type="text/css" />"""
    + <link rel="stylesheet" href="C:/test.css" type="text/css" />"""
    ?                              ++

  python 3.4.1

  * test.css path error (filed #256) 
  * test_parsers\test_rst\test_directives\test_include.py::

      b'Encoding:\n\n.. include:: test_parsers/test_rst/test_directives/utf-16.csv\n   :encoding: utf-16\n'
        File "test3\alltests.py", line 40, in write
          string = string.encode('raw_unicode_escape').decode('ascii')
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 994: ordinal not in range(128)

   fiddling with alltests.py (uncommitted) ::

      <system_message level="4" line="1" source="test data" type="SEVERE">
        <paragraph>
            Problem with "raw" directive:
            UnicodeDecodeError: \'utf-16-be\' codec can\'t decode bytes in position 90-91: illegal encoding
        <literal_block xml:space="preserve">
            .. raw:: html
               :file: test_parsers/test_rst/test_directives/utf-16.csv
               :encoding: utf-16''' != '''\



Release 0.11
============

Summary
-------

``sandbox/infrastructure/release.sh`` tries running ``test/alltests.py`` after 
installing the new release, this fails because

* tests depends on e.g. ``../docs/user/rst/images/title.png`` or ``../HISTORY.txt``, 
  but thess are neither in the test directory tree nor in the installed software. 

* there is a lot of code trying to handle varying installation targets ``/usr/lib``
  ``/usr/local/lib` and not yet ``/usr/lib/pymodules``.

Change testing to:

1. build and install
2. extract docutils-<release>.tar.gz into tmp
3. remove docutils/docutils directory, just to make shure it is not used.
4. run test/alltest.py in this directory, so all files are where they are
   while development.

Following failure becuase docutils-library directory was removed, therefore 
docutils/writers/html4css1/html4css1.css is not found::

  ======================================================================
  FAIL: test_custom_stylesheet_dir (test_writers.test_html4css1_misc.SettingsTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/... 0.11/test/test_writers/test_html4css1_misc.py", line 81, in test_custom_stylesheet_dir
      self.assertIn('docutils/writers/html4css1/html4css1.css', styles)
    File "/... 0.11/test/DocutilsTestSupport.py", line 138, in assertIn
      msg or '%s not in %s' % _format_str(a, b))
  AssertionError: 'docutils/writers/html4css1/html4css1.css' not in u'''\
  <link rel="stylesheet" href="html4css1.css" type="text/css" />
  <link rel="stylesheet" href="data/ham.css" type="text/css" />
  '''


Tests
-----

* ubuntu 8.04 2.4.5, 2.5.2, 2.6.7, 2.7.2 OK

  python 2.6.4rc1 6 failure due to change in error message: no such file ...  

  Python 3.2.3 : OK (roman.py left over from last release)

* macosx 10.6.8: python 2.5.4, 2.7.3

  python 2.6.1 6 failure due to change in error message: no such file ...  

  python 3.2: roman.py for py3 required.

Release.sh
----------

release.sh does not work on MacOSX.

installation on ubuntu 10.04 breaks test script::

  Working directory: /usr/local/lib/python2.6/site-packages/docutils-test
  Docutils package: /usr/local/lib/python2.6/dist-packages/docutils

  ======================================================================
  FAIL: test_find_file_in_dirs (test_utils.HelperFunctionsTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/local/lib/python2.6/site-packages/docutils-test/test_utils.py", line 295, in test_find_file_in_dirs
      '../HISTORY.txt')
  AssertionError: 'HISTORY.txt' != '../HISTORY.txt'

Stopping for now.



Release 0.10
============

* same failures for some python2.6 versions ::

              Problems with "raw" directive path:
       -      InputError: [Errno 2] No such file or directory: 'non-existent.file'.
       +      InputError: (2, 'No such file or directory').

* testing release tarball ::

    ======================================================================
    FAIL: test_dependencies (__main__.RecordDependenciesTests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "docutils-test/test_dependencies.py", line 61, in test_dependencies
        self.assertEqual(record, expected)
    AssertionError: [u'data/include.txt', u'data/raw.txt'] != [u'../docs/user/rst/images/title.png',
    u'data/include.txt', u'data/raw.txt']
    
    ...

  because ../docs is not there if run from /usr/../pythonx.x/site-packages/docutils-test.

Release 0.9.1
=============

same failures as for 0.9 plus

* python 2.3: twice, ignored ::

  -             [Errno 2] No such file or directory: 'bogus.csv'.
  +             [Errno 2] No such file or directory: u'bogus.csv'.

  python 2.3 ::

    ======================================================================
    ERROR: test_unicode (test_error_reporting.ErrorStringTests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/lib/python2.3/site-packages/docutils-test/test_error_reporting.py", line 153, in test_unicode
        self.assertEqual(u'ImportError: %s' % SafeString(self.bs),
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 0: ordinal not in range(128)

Note: sf takes some considerable time till the downlods are visible for normal users.
  More than 1 hour , the folder files/docutils/0.9.1 exists and the webinterface
  correctly summarizes "Totals: 2 Items	 	1.6 MB" but nothing is shown.

Release 0.9
===========

* python 2.3 unittest.TestCase has no assertTrue
* python 2.3 keyword dictionaries update method does not support kwargs

Ignored test errors

* python 2.3: unicode problems. 2.3 support is likely to be ended soon.
  Systems with only 2.3 might not even know of unicode.

* PIL ``AttributeError: 'module' object has no attribute 'Image'``

  A problem in PIL ? 
  Tested and failiing on

  - ubuntu8.04, python 2.4, 2.5  
  - ubuntu10.04, python 2.6  
  - ubuntu11.10, python 2.7  

* python 2.6.4rc1 has a different error message format::

              Problems with "raw" directive path:
       -      InputError: [Errno 2] No such file or directory: 'non-existent.file'.
       +      InputError: (2, 'No such file or directory').

  but not in python 2.6.7
